﻿using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using TrainingManagerSystem.WebUI.TrainingManagerSystemService;

namespace TrainingManagerSystem.WebUI.Models
{
    public class AccountCertificateModel
    {
        private TrainingManagerSystemModelClient _trainingManagerSystemModelClient;

        public List<AccountCertificate> Search(int pageSize, int currentPage, int certificateId, string employeeId, string certificateProvider, string certificateCategory, string accountName, string certificateName, string score, bool isCertificateNode, int statusAccountId) {
            _trainingManagerSystemModelClient=new TrainingManagerSystemModelClient();
            return _trainingManagerSystemModelClient.SearchAccountCertificate(pageSize, currentPage, certificateId, employeeId, certificateProvider, certificateCategory, accountName, certificateName, score, isCertificateNode, statusAccountId).ToList();
        }

        public List<Certificate> Certificates() {
            _trainingManagerSystemModelClient=new TrainingManagerSystemModelClient();
            return _trainingManagerSystemModelClient.Certificates().ToList();
        }

        public Certificate CertificateDetailByCertificateId(int certificateId) {
            _trainingManagerSystemModelClient=new TrainingManagerSystemModelClient();
            return _trainingManagerSystemModelClient.CertificateDetailByCertificateId(certificateId);
        }
    }
}